package org.jeecg.modules.system.model;

import lombok.Data;
import org.jeecg.modules.system.entity.SysDepart;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: yinhm
 * @Date: 2024-08-26 09:06
 * @Version: V1.0
 */


@Data
public class DepartmentNode {
    private String id;
    private String departName;
    private String parentId;

    private String orgCode;


    private List<DepartmentNode> children = new ArrayList<>();


    public DepartmentNode(SysDepart sysDepart) {
        this.id = sysDepart.getId();
        this.departName = sysDepart.getDepartName();
        this.parentId = sysDepart.getParentId();
        this.orgCode = sysDepart.getOrgCode();
    }

}
